<!--
 * @Descripttion: 
 * @version: 1.0
 * @Author: Sam
 * date: 2021-09-07 20:25:16
 * @LastEditors: Sam
 * @LastEditTime: 2021-09-27 11:58:27
-->
{include file="common/public/header"}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-card">
            <div class="layui-card-header">{$page_title}</div>
            <div class="layui-card-body">
                <form class="layui-form padsome" action="">
                    <div class="layui-form-item" >
                        <div class="layui-form-label">标题</div>
                        <div class="layui-input-block">
                            <input class="layui-input"  name="title"  lay-verify="required"  placeholder="请输入标题"  value=""/>
                        </div>
                    </div>
                    <div class="layui-upload-drag" id="test10">
                        <i class="layui-icon"></i>
                        <p>点击上传，或将文件拖拽到此处</p>
                        <div class="layui-hide" id="uploadDemoView">
                            <hr>
                            <img src="" alt="上传成功后渲染" style="max-width: 196px">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <div class="layui-footer" style="left: 0;">
                                <button class="layui-btn" lay-submit="">立即提交</button>
                                <button class="layui-btn layui-btn-primary" type="button" onclick="back_url()">返回</button>
                            </div>
                        </div>
                        <!--<div class="layui-input-block layui-layout-admin">-->
                            <!--<div class="layui-footer" style="left: 0;">-->
                                <!--<button class="layui-btn" lay-submit="">立即提交(iframe模式)</button>-->
                                <!--<button class="layui-btn layui-btn-primary" type="button" onclick="close_frame()">返回</button>-->
                            <!--</div>-->
                        <!--</div>-->
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{include file="common/public/ueditor" /}
{include file="common/public/umeditor" /}
{include file="common/public/footer" /}
<script>
    layui.use(['upload', 'element', 'layer'], function(){
        var $ = layui.jquery
            ,upload = layui.upload
            ,element = layui.element
            ,layer = layui.layer;
        //拖拽上传
        upload.render({
            elem: '#test10'
            ,url: 'https://httpbin.org/post' //此处用的是第三方的 http 请求演示，实际使用时改成您自己的上传接口即可。
            ,accept: 'file' //视频
            ,done: function(res){
                console.log(res)
                layer.msg('上传成功');
                layui.$('#uploadDemoView').removeClass('layui-hide').find('img').attr('src', res.files.file);
                console.log(res)
            }
        });

    });
</script>